package com.zretc.service.impl;

import com.zretc.dao.ProductCollectMapper;
import com.zretc.entity.ProductCollect;
import com.zretc.service.ProductCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 * @author WHP
 */
@Service
public class ProductCollectServiceImpl implements ProductCollectService {
    @Autowired
    private ProductCollectMapper productCollectMapper;

    @Override
    public int saveProductCollect(ProductCollect productCollect) {
        return productCollectMapper.insertProductCollect(productCollect);
    }

    @Override
    public int deleteProductCollectByCollectId(int productCollectId) {
        return productCollectMapper.deleteProductCollectByCollectId(productCollectId);
    }

    @Override
    public List<ProductCollect> getyAllProductCollectList() {
        return productCollectMapper.findAllProductCollect();
    }

    @Override
    public ProductCollect getProductCollectList(Integer productCollectId) {
        return productCollectMapper.findProductCollect(productCollectId);
    }
}
